Copies all of the items in the BlockingCollection<(Of <(T>)>) instance
to a compatible one-dimensional array, starting at the specified index of the target array.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub CopyTo ( _
array As T(), _
index As Integer _
) |
C# |
---|
public void CopyTo(
T[] array,
int index
) |
Parameters
- array
- Type: array<
T
>[]()[]
The one-dimensional array that is the destination of the elements copied from
the BlockingCollection<(Of <(T>)>) instance. The array must have zero-based indexing.
- index
- Type: System..::.Int32
The zero-based index in array at which copying begins.
Exceptions
Exception | Condition |
---|
System..::.ArgumentNullException | The array argument is
null. |
System..::.ArgumentOutOfRangeException | The index argument is less than zero. |
System..::.ArgumentException | The index argument is equal to or greater
than the length of the array. |
System..::.ObjectDisposedException | The BlockingCollection<(Of <(T>)>) has been disposed. |
See Also